package date1127.bean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.lu.jdog.util.Resource;

public class SpringTest {
private static ApplicationContext applicationContext;

public static void main(String[] args) {
	applicationContext = new ClassPathXmlApplicationContext(Resource.getAssertPath(SpringTest.class,"beans.xml"));
	Chinese chinese = (Chinese) applicationContext.getBean("chinese");
	boolean flag = chinese.getApplicationContext() == applicationContext;
	System.out.println("实现 ApplicationContextAware 接口获取的ApplicationContext与创建此bean的ApplicationContext是否为同一个：");
	System.out.println(flag);
	
}
}
